<?php

namespace App\Http\Transformers;

use App\Models\Category;
use League\Fractal\TransformerAbstract;

class CategoryTransformer extends TransformerAbstract {

    public function transform(Category $item) {
        return [
            'id' => $item->id,
            'title' => $item->title,
            'desc' => $item->desc,
            'logo' => $item->logo,
            'parent_id' => $item->parent_id,
        ];
    }

}
